#! /bin/sh
### BEGIN INIT INFO
# Provides:          usbblaster
# Required-Start:
# Required-Stop:
# Default-Start:
# Default-Stop:      0
# Short-Description: Mount usbfs to work with usbblaster
# Description:
### END INIT INFO

NETDOWN=yes

PATH=/sbin:/usr/sbin:/bin:/usr/bin
[ -f /etc/default/halt ] && . /etc/default/halt

. /lib/lsb/init-functions


case "$1" in
  start)
	mount --bind /dev/bus /proc/bus
	ln -s /sys/kernel/debug/usb/devices /proc/bus/usb/devices
	;;
  restart|reload|force-reload)
	echo "Error: argument '$1' not supported" >&2
	exit 3
	;;
  stop)
	rm /proc/bus/usb/devices
	umount /proc/bus
	;;
  *)
	echo "Usage: $0 start|stop" >&2
	exit 3
	;;
esac

:
